from django.db import models

# Create your models here.


class MXorder(models.Model):
    uid = models.IntegerField(verbose_name="用户id")
    order_code = models.CharField(max_length=200, verbose_name="订单编号")
    total_count = models.IntegerField(verbose_name="订单商品总数量")
    total_amount = models.FloatField(default=0, verbose_name="订单总金额")
    status = models.SmallIntegerField(default=1, verbose_name="1代表未支付  2代表已支付、未发货  3代表已发货、为收货  4 代表已收货")

    class Meta:
        db_table = 'mx_order'


class MXorderdetail(models.Model):
    uid = models.IntegerField(verbose_name="用户id")
    order_code = models.CharField(max_length=200, verbose_name="所属订单编号")
    goods_id = models.IntegerField(verbose_name="商品id")
    counts = models.IntegerField(default=0, verbose_name="商品数量")
    price = models.FloatField(default=0, verbose_name="商品售价")

    class Meta:
        db_table = 'mx_order_detail'

